<template>
  <v-touch class="swiper-div" @swiperight="onSwiperRight" :swipe-options="{direction: 'horizontal'}">
    <head-top
      :title="Number($route.params.id) === $baseJS.getLoginUser().id ? '编辑个人信息' : '编辑员工账号'"
      :right-text="'完成'"
      :right-event="true"
      v-on:rightClickEvent = "editStaff"
    ></head-top>
    <profile-edit ref="profileEditRef" v-on:profileEditToMain="toMain"></profile-edit>
  </v-touch>
</template>

<script>
import HeadTop from "@/components/HeadTop"
import ProfileEdit from "@/components/profile/edit";
export default {
  components: {
    ProfileEdit,
    HeadTop,
  },
  name: "ProfileViewEdit",
  methods: {
    editStaff() {
      this.$refs.profileEditRef.editProfile()
    },
    toMain() {
      this.$router.push(this.GLOBAL.pathSetting.profile.main)
    },
    onSwiperRight() {
      this.$router.go(-1)
    }
  },
};
</script>
<style scoped>
</style>
<style>
</style>